/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package upc.jfactory.scp.jpa.bean;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Diego
 */
@Embeddable
public class CompetenciasXPostulantePK implements Serializable {
    @Basic(optional = false)
    @Column(name = "competenciasalumno_id", nullable = false)
    private int competenciasalumnoId;
    @Basic(optional = false)
    @Column(name = "postulante_id", nullable = false)
    private int postulanteId;

    public CompetenciasXPostulantePK() {
    }

    public CompetenciasXPostulantePK(int competenciasalumnoId, int postulanteId) {
        this.competenciasalumnoId = competenciasalumnoId;
        this.postulanteId = postulanteId;
    }

    public int getCompetenciasalumnoId() {
        return competenciasalumnoId;
    }

    public void setCompetenciasalumnoId(int competenciasalumnoId) {
        this.competenciasalumnoId = competenciasalumnoId;
    }

    public int getPostulanteId() {
        return postulanteId;
    }

    public void setPostulanteId(int postulanteId) {
        this.postulanteId = postulanteId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) competenciasalumnoId;
        hash += (int) postulanteId;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof CompetenciasXPostulantePK)) {
            return false;
        }
        CompetenciasXPostulantePK other = (CompetenciasXPostulantePK) object;
        if (this.competenciasalumnoId != other.competenciasalumnoId) {
            return false;
        }
        if (this.postulanteId != other.postulanteId) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "upc.jfactory.scp.jpa.bean.CompetenciasXPostulantePK[competenciasalumnoId=" + competenciasalumnoId + ", postulanteId=" + postulanteId + "]";
    }

}
